package cn.hdustea.shopNavigation.ui.presenter

import cn.hdustea.shopNavigation.entity.Beauty
import cn.hdustea.shopNavigation.entity.Mall
import cn.hdustea.shopNavigation.ui.contract.MallSearchContract
import cn.hdustea.shopNavigation.ui.model.MallSearchModel
import com.hdustea.base.base.BasePresenter



class MallSearchPresenter(mView: MallSearchContract.View) : BasePresenter<MallSearchContract.View, MallSearchContract.Model>(mView), MallSearchContract.Presenter {

    override fun getModel(): MallSearchContract.Model = MallSearchModel()

    override fun getSearchList(keyword: String, isRefresh: Boolean) {
        mModel.getSearchList(keyword, object : PresenterCallback<MutableList<Mall>>() {

            override fun callback(data: MutableList<Mall>) {
                mView?.dismissLoading()
                mView?.setSearchList(data, isRefresh)
            }

        })
    }


}